import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'index',
    component: resolve => require(['@/pages/index'], resolve),
    meta: {
      title: '记忆旅途-首页'
    }
  },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/pages/login'], resolve),
      meta: {
        title: '记忆旅途-登录'
      }
    },
    {
      path: '/regist',
      name: 'regist',
      component: resolve => require(['@/pages/regist'], resolve)
    },
    {
      path: '/my-content',
      name: 'my-content',
      component: resolve => require(['@/pages/myContent'], resolve),
      meta: {
        title: '记忆旅途-我的文章'
      }
    },
    {
      path: '/write',
      name: 'write',
      component: resolve => require(['@/pages/write'], resolve),
      meta: {
        title: '记忆旅途-写文章'
      }
    },
    {
      path: '/detail',
      name: 'detail',
      component: resolve => require(['@/pages/detail'], resolve),
      meta: {
        title: '记忆旅途-文章详情'
      }
    },
    {
      path: '/category',
      name: 'category',
      component: resolve => require(['@/pages/category'], resolve),
      meta: {
        title: '记忆旅途-分类管理'
      }
    },
    {
      path: '/reset-pwd',
      name: 'reset-pwd',
      component: resolve => require(['@/pages/reset-pwd'], resolve),
      meta: {
        title: '记忆旅途-重置密码'
      }
    }
  ]
})
